//
//  HSViewController.m
//  HSToolKit
//
//  Created by 772729579@qq.com on 08/02/2018.
//  Copyright (c) 2018 772729579@qq.com. All rights reserved.
//

#import "HSViewController.h"
#import "HSTestOneViewController.h"
#import "HSNavigationControllerManager.h"

@interface HSViewController ()

@end

@implementation HSViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    UIButton *testButton = [UIButton buttonWithType:UIButtonTypeCustom];
    testButton.frame = CGRectMake(100, 100, 200, 100);
    testButton.backgroundColor = [UIColor colorWithRed:arc4random_uniform(256.0)/256.0f green:arc4random_uniform(256)/256.0f blue:arc4random_uniform(256)/256.0f alpha:1.0f];
    [testButton addTarget:self action:@selector(testButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
    [testButton setTitle:@"Main" forState:UIControlStateNormal];
    [self.view addSubview:testButton];
    
    self.view.backgroundColor = [UIColor colorWithRed:arc4random_uniform(256.0)/256.0f green:arc4random_uniform(256)/256.0f blue:arc4random_uniform(256)/256.0f alpha:1.0f];
}

- (void)testButtonClicked:(UIButton *)sender
{
    [HSNavigationControllerManager sharedInstance].viewControllerNeedNavigationBarHiddenNames = @[@"HSTestTwoViewController"];
//    [HSNavigationControllerManager sharedInstance].navigationBarLineColor = [UIColor redColor];

    UINavigationController *nav = [HSNavigationControllerManager navigationControllerWithViewControllerName:@"HSTestOneViewController"];
    [self presentViewController:nav animated:YES completion:nil];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
